// 文档类型定义
export interface Document {
  id: number;
  title: string;
  content?: string;
  fileName: string;
  fileType: string;
  fileSize: number;
  uploadTime: string;
  knowledgeBaseId: number;
  status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
  processingMessage?: string;
  chunks?: number;
  uploadedBy: number;
}

// 文档创建请求
export interface CreateDocumentRequest {
  title: string;
  content?: string;
  file?: File;
  knowledgeBaseId: number;
}

// 文档更新请求
export interface UpdateDocumentRequest {
  id: number;
  title?: string;
  content?: string;
}

// 文档查询请求
export interface DocumentQuery {
  page: number;
  pageSize: number;
  knowledgeBaseId?: number;
  searchTerm?: string;
  fileType?: string;
  status?: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
  sortBy?: 'uploadTime' | 'fileSize' | 'title';
  sortOrder?: 'asc' | 'desc';
}

// 文档查询响应
export interface DocumentResponse {
  data: Document[];
  total: number;
  page: number;
  pageSize: number;
}

// 文档上传进度
export interface UploadProgress {
  documentId: number;
  progress: number;
  status: 'UPLOADING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
  message?: string;
}